<?php session_start();
include('../functions.php');
if ($_SESSION["pass"] != check($_SESSION["user"])) {
log_write('user', 'Possible hack attempt detected', 'Incorrect password specified for user');
die('HACK ATTEMPT: This attempted hack has been logged along with your IP');
exit;
} elseif(!isset($_SESSION["pass"])) {
log_write('user', 'Possible hack attempt detected', 'No password specified for user: '.$_SESSION["user"]);
die('HACK ATTEMPT: This attempted hack has been logged along with your IP');
exit;
} if($_SESSION["power"] != 'Administrator') {
log_write('admin', $_SESSION["user"].' has attempted to access the Admin area', 'Security Breach');
header("Location: /");
exit;
}
if($_POST['details'] != '' ||  $_POST['name'] != '' || $_POST['subject'] != '') {
$RepArray = API_Connect("TYPE=".urlencode('BugReport')."&SUBJECT=".urlencode($_POST['subject'])."&DETAILS=".urlencode($_POST['details'])."&NAME=".urlencode($_POST['name']));
echo <<<BUG
<fieldset><legend>{$RepArray['BUGID']} - {$_POST['subject']}</legend>
OlliesPage.net would like to thank you for reporting this bug and shall look into it as soon as possible.<br /> If for any reason we cannot make sense of your bug report we will contact your license holder via e-mail.<br />Thank you for helping to support the oPanel Project and we hope you continue to use the oPanel system.
</fieldset>
BUG;
} else {
if(isset($_POST['details'])) { $details = $_POST['details']; } else { $details = ''; }
if(isset($_POST['name'])) { $name = $_POST['name']; } else { $name = ''; }
if(isset($_POST['subject'])) { $subject = $_POST['subject']; } else { $subject = ''; }
echo <<<TYT
						<form name="addUser" action="" method="post">
								<fieldset>
        		 	                <legend>Report a bug</legend>
        		 	                <table style='width: 100%; border: 0px; padding:0px' cellspacing='0' width="1113" height="74">
										<tr>
            		 	                    <td class="title">Name:</td>
            		 	                    <td class='content'><input type='text' class='sql_form' name='name' value='{$name}' /></td>
            		 	                	<td height="24">&nbsp;</td>
										</tr>
										<tr>
            		 	                    <td class="title">Subejct:</td>
            		 	                    <td class='content'><input type='text' class='sql_form' name='subject' value='{$subject}' /></td>
            		 	                	<td height="24">&nbsp;</td>
										</tr>
										<tr>
            		 	                    <td height="24" colspan="3"><span class="title">Details:</span><br /><textarea name="details" style="width: 100%; height: 200px;">{$details}</textarea></td>
           		 	                    </tr>
            		 	            </table>
					<b><font color="red">It is a requirement that all feilds are completed</font></b><br />
					<input type="button" class="nButton" name="addUsr" onclick="javascript:repBug('admin/bugs.php','POST');" value="Report the bug" />
            		 	        </fieldset></form>
TYT;
}
?>